import React from "react";
export default class TabBar  extends React.Component{
    state={
        list:[
            {id:1,name:'电影'},
            {id:2,name:'影院'},
            {id:3,name:'我的'},
        ],
    }
    render(){
        return(
            <ul>
                {this.state.list.map((item,i)=>
                    <li key={item.id} className={i===this.props.current?'active':''} onClick={()=>{this.props.handleChange(i)}}>{item.name}</li>
                )}
            </ul>
        )
    }
}